fixed bug in shell script