Fix flickering in webkit browsers