Fix a bug after edit