Fix in instantiating connection