fixed exception generation