fix bug in onOnce, freeze the core event _proto