Halfway through deleting all of the e-mails it drops out of the loop.....

Is there something wrong with my loop?