Fixed maxDepth operator in Tree