Fix for Mac OSX