You must prepare the correct Form 1040NR.
Then attach that to Form 1040X, with explanation "Filed on the wrong form EZ instead of NR".
Visit <a rel="nofollow" target="_blank" href="http://www.irs.gov">www.irs.gov</a> for the document "Instructions for Form 1040X".
do you prepare the correct form like if it was the first time? I mean he already got the refund back so in line 23 "how much do you want refunded from line 22" what should we put?