What happens after the loop? Could you post an SSCCE demonstrating what's going on?