Got cancelButton to work successfully