Fixed the next method