add unread message and fixing chat bug