After you file

The $500 you paid is included in the $1,400 tax refund.  The original return would have had a $900 refund if the amended return was not needed.