Fixed bug. Missing next() call