Sorry I found what was wrong about tree length, is worked fine. I didn’t wait before my dynamical nodes loading will end and call tree.length.