Multiple fixes indicated by shellcheck.