Fixed a bug: used wrong method in getHistoryAsString to get history