fixed set end date bug