Passing the previous index when invoking the delegate method for changing page