Fix loop, forgot to use new variable