some fixes in db