fix foundations and other things