Fixes an event bug.