fixed next() with size = 0