fixed the flash error bug
Merge pull request #293 from Tmee/fixing_things

fixed the flash error bug