fix flickering/tearing