Fixing bug compiling on macosx