Fixes error in historyId.