Fix tree

This reverts changes that effectively reverted:
  76de8c15ef406733feb08cc8bd35b16f97e60e9d
  db306092699979cc966e7f7d5d4ab26c58645174