Fixes previous PR

ZIP generation still has bugs, this PR fixes them.