fixed history code
please work
Revert "fixed history code"

This reverts commit 255603d347725f002c64d0d8be9dcb4e0b977ee9.