should correct crashing bug on Mac