Fix bug in the repacker tool