Fixed error on OSX