Fixed saving HistoryItem to database a bit. Still few mistakes.