Fix flash responses for invalid codes