In this paper we consider the KPSS test. We derive the asymptotic distribution of the statistic under the null of stationarity and under the unit root alternative under the "fixed-b" assumption that the ratio of the number of lags in the long run variance estimate to the sample size is fixed. Regardless of how the number of lags is actually chosen, the fixed-b asymptotic theory provides a better approximation to the finite sample distribution of the statistic than the traditional KPSS asymptotics. If the series being tested is stationary but has strong positive autocorrelation, the KPSS test has substantial size distortions (overrejections). We show that this problem can be more or less solved by using a larger number of lags than has traditionally been used. Using more lags costs power, but using the fixed-b critical values minimizes the power loss.