Get your taxes done using TurboTax

You are correct. Since it was repaid in the same year, it should not have been included as compensation. Other amounts such as withholding, etc, would need to be adjusted to reflect the repayment. Try contacting your employer. They are supposed to issue the W-2 reflecting the repayment. If by the end of February (per the IRS webpage) you have had no success, contact the IRS. They want to be contacted, just in case you need to use Form 4852 to report the correct amounts. They will send a letter to the employer. 

From IRS webpage

If your W-2 is incorrect

Ask your employer to correct the error. If your employer doesn't correct it by the end of February, you should either:

We'll send your employer a letter asking them to give you a corrected W-2 within 10 days.

We'll also send you instructions for Form 4852, Substitute for Form W-2. You can use it to estimate your earnings.