Fix pkg query
Fix warning