Fixed all 'sign-change'/'variable-swap' issues with control-loop
Merge