catch exceptions and fix some vars
Merge pull request #14742 from steverweber/fix_stuff

catch exceptions and fix some vars