Avoid NaNs.