fixed shell existence check