some mac osx fixes