Fixed a bug when defining which shell