fix history entries order in HistoryManager