Fix broken dates logic. Doh (again)!