Fix to work on OSX