Fixed a bug in CursorMock.next