Fix conditional assignment