High-resolution, liquid-crystal spatial light modulators (SLMs) are being used as dynamic phase screens(1,2) for testing optical systems and as optical wavefront compensators(3,4) to dynamically correct distortions. An SLM provides hundreds of waves of adjustable phase modulation across the aperture of the device. Some of this phase adjustment can be used to compensate for distortions internal to the SLM such as backplane curvature. Because of modulo-2pi operation, the dynamic range of the device is not significantly decreased by adding phase compensation, as long as the phase shift over the aperture is only a few waves. In this paper, we will discuss the techniques being used to determine the correct phase compensation for SLMs and how the compensation is being applied through the SLM control software.