fixing appPackage bug