Removed extra variable in loop.