Fixed issue with non-linear history