fix pagination / sorting