fix tree root when rotating nodes