various changes to please shellcheck