Sort of fixed readHistory bug.