cleanup connection and service ref counting without changing behavior