Fixes issue with connect function and connection attribute not being set...

... correctly when instantiating.