Fixed paging issue when getting records from server