Fix preserving messages in chats