Fixing event dispatching.