Fix in exception handling