better shell detection