some more bugfixes in event detection