Fix errors with events in obfuscated builds