fixes in db communication