A fix for start dates that come after end dates