Mods to make mac OSX work thanks to Ed