fix vector bug when creating new root