fixed OS X crashing with temporary fix