Tried to fix flickering on Mac OS X