fixed a bug when a chat is created remotely