fix chat.js