Fix #connection deprecation warnings