Made the code compile on OSX
Fixed the uncompilable code (on any platform)