We analyze a rating agency's incentives to distort ratings in a model with a monopolistic profit maximizing rating agency, a continuum of heterogeneous firms, and a competitive market of risk-neutral investors. Firms sell bonds, the value of a firm's bond is known to the firm and observable by the agency, but not by buyers. Firms can choose to get a rating. The rating agency can reveal a signal of arbitrary precision about the quality of the bond. In contrast to the existing literature, we allow aggregate uncertainty. As in the existing literature, one rating class is optimal. However, the rating agency does not choose a socially optimal cutoff: the agency is more likely to be too lenient if the distribution of aggregate uncertainty has a lower mean, a higher variance, and is more left skewed. It is more likely to be too strict if the opposite holds.