Small fixes to bash script