fix leak in parsing inuse queries