Improving shell handling