removing bad statements in except statements