Correctly handle closing the conversation window from script