Closed db connections properly.