Fix misuse of types in EventLoop