Fixes to image flashing.