Possibly a fix for crash on OS X