Fix typo and incorrect return value in pkg Upstream-commit: 95ce998c10ac407ee0a07c92f14969b573df478e Component: engine