OSX compatibility bugfix

Compatible with OSX XCODE