fixing safari flicker issue