Fix ruby error in paging.