Fixed type of caught exceptions.