Merge "Revise the checking logic of checkPackage"