Bug fix: OSX method called on non-mac OS