Some fixes following Tim's comments.
O'Neil: Bug fix #21263