fix multiple shell problem #4144