bugfix for DFT