Fix flash code