Tweaks to try to get event handling a little more correct.