Fixing query