some fixes in db modules