Correcting non-declaration of vars in chat.js.