Small fix on the passing of Event pointers, so they don't run out of scope.