fixed bug in cron