Fix #connection deprecation warnings

Subject