pagination directive fixes