Exception handler improvements