replaced Discard with Cancel