Improve the handling of packages