fix error on mac osx