Fixed saving historyitem, getting historyitem data on database, historyitems' details.