bug fix for cron task