fix history file switch