fix assignment bug in history action for the query builder