fix bugs in DDG module