Fixing image flickering.