fix two little bugs in deh code