Fix OSX errors.