Bandaid fix for weird crash on OSX