fixed bug in routing of events