Fixed bug in query panel.