fixed a bug with subtree moving