fix bug not to make relation with query_id