Fixed faulty conditional that tested LATEST_DATE.