fix history file