Fixing bug in the shell command