fixing bug in dataset creation NEXUS