fix unregister services bug