fix some bugs.
Need to recode dbitem to be compliant with dmditem.