tree bugfix moving nodes back to root