fix to compiling on mac