small bugfixes non - functional fixes in db driver