multiple bugfixes for tree widget