Improve behavior on OSX