code cleanups after shellcheck