Fixes invalid active state on event dispatch