fix bugs
ServiceInstanceFactory