bugfix for bash script