The example was referencing a variable that did not yet exist, instead of referencing "@event", so it did not compile. This fixes that, leading to correct behaviour.