bugfix in query printer