Bug fix in shell.js