Fixed factory connection issue