Update to work with Mac OSX