Fix archiving of multiple artifacts.

This fixes an issue where it wasn't archiving all the artifacts correctly (it was archiving the first one several times).