fix flash bug