fixed DD internal state corruption with energy minimization