Fixed bugs in foo/bar.

Now runs properly standalone.