fixing const and collection query