Fix warnings in foundation