OS X hacks to make it work properly