fixed  a small bug in the cron script