fix hang in chat