fix DateTime ordering bug