fixed error with pagination caused by type mismatch