Fix sorting. close #144
Fix sorting. close #144

See #143 for description.
alexbirukov/datetime,jonmifsud/datetime,jonmifsud/datetime,domsammut/datetime,alexbirukov/datetime,alexbirukov/datetime,domsammut/datetime