Working out foundation bug