fix some bug for remove subtree