Reverted back the changes to cancel().