Backport a couple fixes for packs