Fixed OnMessage handler to use channel name rather than index