#14 Additional fixes to event handling