fixed an error on OSX