bugfixes for conditional assignment