fix a bug when set service is null