Fixed cancelButton method