Tweaks for OSX compliation