lots of fixes from the tester