Various minor OSX fixes
Merge remote-tracking branch 'chiiph/bug/several_osx_fixes' into develop