Fixed rewrite of onmessage handler in ie