Fix a bug where I modified a var in a looop.