cleanups and return of alert dialog