Non resident social security taxes

For US non resident should social security tax & medicare tax not be withheld?

 

Should i contact my employer to correct my W2?

At the time of exiting US it was not known whether I will be non resident for that year and will not meet the substantial presence test by returning there. Hence payslips and W2 reflect social security withheld.