Use a while loop to properly restart regen