Dispersion in investor beliefs and short-selling constraints can lead to stock market bubbles. This paper argues that firms, unlike investors, can exploit such bubbles by issuing new shares at inflated prices. This lowers the cost of capital and increases real investment. Perhaps surprisingly, large bubbles are not eliminated in equilibrium nor do large bubbles necessarily imply large distortions. Using the variance of analysts? earnings forecasts to proxy for the dispersion of investor beliefs, we find that increases in dispersion cause increases in new equity issuance, Tobin's Q, and real investment, as predicted by the model.