Better shell handling