Fix dialyzer errors in connect