Avoid returning NaN.