fix bug of deleteing the root