A phase and gain corrector is described for a modem for receiving QAM or PSK-encoded signals. An ideal vector corresponding to the received vector is generated and the difference or error vector is resolved into a radial component in the direction of the ideal vector a tangential component. A gain corrector and a phase corrector variable are calculated from said radial and tangential components of the error vector and used to correct the gain and phase of the received signals. A secondary detector is also used to detect signals corresponding to extreme points of the signal constellation. The output of the secondary detector is used to modify the gain corrector variable thereby compensating for large gain hits.