Further JSON related fixes