Fixed MAC compiling issues