fixed a bug that causes adding unexpected redundant null character
fixed compile errors of ArchiveTest and reduced warnings