bug fixes in shell