fix publish event bug