Fixing query see BT#7297