more work on bug fixes and test fixes for bugs 783499 and 808370