Fixed exception when history file is blank