fix py hashtree get_segment bug.
fix SHA1_Final crash