Attempted another fix to bash script