Disabling a customer using API creates duplicates of services

I am using the API to disable a customer. When disabling the customer it creates duplicates of the services but the old service is marked as disabled and the new duplicates are created with a status of stopped. When re-enabling the customer the stopped services are marked as active.

Is there something I need to do in order to avoid this?