Fix the end date bug.