Fix a bug in pack.php class

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