better fix for OSX