Wip ec bugs

Misc ec/primary affinity related fixes.