Fix NaN conversion, etc.