Update main.js

Update was referring to the wrong message variable. Fixed now!