fix misisng exception cast