fixed bug when removing a service