fix StateTree
cleanup