Made it work on os x.