Fix event scoping