fixed bug in pack