fix to archive date logic