Various fixes to undo problems caused by the shellcheck compliance.