quick fix to chat.js
merging change from master