try to fix crash on osx (#200)