got messages to work, small change to the event handling