Fixes in the refactored shell