Fix bug in OSX support.