Fix minor bug detected when creating JSON files for wrong R data.