fix bug on HistoryStore