Why isn't the JS getting messages?