bug fixes in shell.h