Initial dist subtree commit
one last bug fixed