Fix the archive function.