More hacky fixes to make OS X behave