JSON compatability fixes.