Fixing daily repeating loop error. More tests