fixes for mac osx 10.8