enable foundation and necessary fix in related files