Various minor fixes

Resolve several recent issues.