Fix start and end date switch