closing db connections