Added a guard that stops the looping when our iter vector is no longer being changed.