Bug fix in dataset lookup