Fix a bug in delete button.