Fixes to make the Unit Spec condition actually work.
Fix ordering of the unit spec condition
One little typo means that a huge part of the code doesn't work.