Fixing bug in chat.js for Command