fixed 'flashing' image bug