fix empty root bug