Fixes on OSX