Fixed end date bug