Fixed infinite date loop