cancel dialog bug fixes