fixed foundation errors