Fixing query BT#7156