Fixed issues with cron