fixed bug gubbs in trees