fixed bug in chat history