Fixed bug that prevented script from running as cron job