fixes for problems found in test run