Resolved issue #33 when sorting to page the to page sort was called first then the on page sort was called which caused the indexes to become confused