fixed flashmode crashing the app