Fix lots of warning detected by shellcheck