fixed the flash error, need to fix it for success save