Fixes query