Fixed a bug that was preventing the cron job from running correcly