Made t/chat.t more robust