fix bugs when adding query&report