Fix pack sorting.