Fixed date ordering in a better way.