fixed document pagination after using filter method