fix bug of flash