fixed getpackages
Merge pull request #491 from t-gerhard/getpackages_fixes

fixed getpackages