Correct error in code for flashing