fix the flash stuff so flash is now working and after an error our data is not cleared out which can be very very annoying.