more fixes on shell logic