fix pagination directive