bf
More fixes for event handling