fixes query