Fixed chat.js