Handling cmd collection queries properly