Fixed bugs in ExportJSONCommand