various fixes. Error catches, etc...