fixed two edge cases that the invalid archive can cause a hard task failure.