fixed logic for cleanDB with only ensemble