Fixed scope rules in while