Fix a bug when handling the archiving of old cases.