Fixing query see BT#7422