Shell detection fix