Fix history id