fixed history bug