Fix nullpointer
Fix tx history update bug (#234)