fixes queries