bugs in db fixed