Fix foundation compatibility issues
Merge pull request #13 from micc83/master

Fix foundation compatibility issues