cancel+close handling for the progress dialog