Fix a bug when deleting node None