Fixes issues on OS X