added osx hacks