fix shell exception