fixed flashing problem