minor changes in event handlers