Fix bug 'Undefined variable: datasetName'