Fixed incorrect class name for getNext() function from 'previous' to 'next'.

Fixed incorrect class name for getNext() function from 'previous' to 'next'.