correcting small bug in the shell script