fixed bug in treehash