Fixed history insonsistency

Fixes #1481