Fixed Table's next() function