Usergrid 2855 pagingtesting

Fixes issue with cursors

USERGRID-2855