Fix: wrong event check causes error

In preparation for the support for separated networks I discovered this error.