fixed start date greater than end bug