Bash: mac os fixes