Corrected issue with pagination ranges
Fixed issue with sorting on non-string columns