fix reassigning a final variable