changed assignment for conditional operator

also workaround for enumerate[resume] ignoring counter