Updated the exit handling of sentiment_analyzer