fixed bug in nextPack