fix bug in d.cc

Schroedinbugs