Add a cancel feature to the edit mode