increase buffer size for unicode escaping, and use null instead of NaN