Fixing queries