Use global next() function rather than method.