fix a bug when the query is run twice