Fixed bug when archive not closed