cwc: fixed problem with changed CA pids by provider and prefered CA pid

new PR for #248 for easy merging.