handle errors more conservatively
try even harder for protecting from exceptions
a test for onmessage