You are moving address of foo directly to segment register. As you probably already know, segment registers are used to hold 20-bit address that is added to the offset. In your case address of foo is something like 0x7E06. When you move this to segment register and zero out the offset, you get address 0x7E06 << 4 + 0 = 0x7E060.
For this case you can use seg as Michael pointed out in the comments:
mov ax, seg foo
mov ds, ax
Or alternatively:
mov ax, foo
shr ax, 4
mov ds, ax
Note that you also have to adjust index register accordingly if your address is not multiple of 16.