fix empty tree connect bug