fix flickering on mac pc