trying to solve a NPE from the Rule PackageManager