fixed some bugs in dba