Fix a bug on pack.php

There are a variable called $row in previous foreach and affect next foreach.