fixes and work on new tests for bug 808370