Fixed the connection creation using the factory

Updated the parameters in the factory.