Incorrect paid amount after tax with foreign payment

Hi - For payment entries in foreign currency and tax in local currency, erpnext appears to return the wrong paid amount after tax value.
Eg: before tax is 3000 usd, tax is 500 aud, erpnext returns paid amount after tax as 2500 usd instead of 2668 usd.

Has anyone else ran into this issue and how did you work around it?