Fixed closing on OSX