fixed history deletion. fixed #780