Fix bug in extracting remote archives