Fix properly processing at end of function or for loop.