Closing connections to db