Fixed DTree.py code