Fix connect deprecration warnings