Fixed closing browser on OSX.