Fix flash of first frame