fixed some foundation errors