fixed dialog bug that crashed app if analysis session ended in background