optimization and a cron bug fix