fixed tree walking for collections