fixing db connections