fix collection repository query