Fix error in the cron task