fix issues found in tests