fixed an archiving issue where images where sent to the trash before they could be archived