Fixa few bugs in the reg tests.
make the reg tests work again

close #115