fixed crash isssue by caused no no service provider in agent.