Fix a bug in the package manager when a package is not compatible

Signed-off-by: Yoshi2889 <rick.2889@gmail.com>
Merge pull request #1658 from Yoshi2889/package_manager_fix

Fix a bug in the package manager when a package is not compatible