few more changes to fix pagination system