Fixed more event handling problems.