Remove a few problematic uses of next()