fix pkg not exists null bug