Fixing the flickering in safari