fix query puppetdb