Fix archive generator
fixes #361