Fix archive functions