Fixed infinite loop when copying old poll
Also replaced while loop with for loop to prevent it from happening again in the future