Fixed event-bugs.