Corrected bug in exception handling example