Fixed bash scripts for more compatibility