Fix bug when cancelling the edit of a group