Fix timestamps comparison