Added logic for amend/cancel