fixing typos in messages.js