Made it work for OS X