fixing some behaviour to work on OSX