Fix packing +UPGRADE scripts

Fixes: #518