Fixed OnMessage handler.