enable foundation and necessary fix in related files

We can foundation!