Use component.id instead of service.pid as the key in the INSTANCES map because the service.pid property may not always be present.