Fix the bugs of flashing images on TK mode