Fix an oversight in exception handling code