fix bug in shell.py module