messages in chat, fix bugs