Fixed (hopefully) for OSX