Osx crash fix.