Solved history corruption problem