Wip ec bugs

Misc ec/primary affinity bug fixes