Fix error during flash