Fixed historyFix method