Fix connect deprecation warnings