Fix sorting of facts by timestamp