Minor cleanup to reduce error log warnings and notices