Fix return type for duration.