Miscellaneous fixes for issues discovered during testing (srimanth)