fixed bug with flash