fixed history formatting bug