fixed bug in tree move