Correct tree depth