fix the query multigraph