Merge pull request #114 from ndawe/master

[MRG] fix handling of empty trees