Fix foundation version check