Fixed chat to end gracefully.