osx fixes
Merge pull request #533 from LudwigOrtmann/osx_fixes

osx fixes