After you file

Was the $228 refund from your 2017 Form 1040X (the amended return)?  If so, your original payment was already factored into that refund amount when you filed the Form 1040X.  So, instead of owing $510 for 2017, you really only owed $282 ($510-$228).