Fix a bug inserting into empty tree