The terrain-following vertical coordinate system used by many atmospheric models, including the Weather Research and Forecasting (WRF) model, is prone to errors in regions of complex terrain. These errors stem, in part, from the calculation of horizontal gradients within the diffusion term of the momentum or scalar evolution equations. In WRF, such gradients can be calculated along coordinate surfaces, or using metric terms that help account for grid skewness. However, neither of these options ensures a truly horizontal gradient calculation, especially if a grid cell is skewed enough that the heights of the neighboring grid points used in the calculation fall outside the vertical range of the cell. In this work, an improved scheme that uses Taylor series approximations to vertically interpolate variables to the level necessary for a truly horizontal gradient calculation is implemented in WRF for the diffusion of potential temperature. The scheme is validated using an atmosphere-at-rest configuration, in which spurious flows develop only as a result of numerical errors and can thus be used as a proxy for model performance. Following validation, the method is applied to the simulation of cold-air pools (CAPs), which occur in regions of complex terrain and are characterized by strong near-surface temperature gradients. Using the truly horizontal scheme, idealized simulations demonstrate reduced numerical mixing in a quiescent CAP, and a realistic case study in the Columbia River basin shows a reduction in positive wind speed bias by up to roughly 20% compared to observations from the Second Wind Forecast Improvement Project.