correcting some mistakes in shell script