Fix history problems (close #1)