Fix a bug regarding chat window still popping up when application is launched, even if the chat window was closed before closing the application.