Added query correction