Fixes to some regression code