```\n    function repayAccountPrimeDebtAtSettlement(\n        PrimeRate memory pr,\n        VaultStateStorage storage primeVaultState,\n        uint16 currencyId,\n        address vault,\n        address account,\n        int256 accountPrimeCash,\n        int256 accountPrimeStorageValue\n    ) internal returns (int256 finalPrimeDebtStorageValue, bool didTransfer) {\n// rest of code\n\n            if (netPrimeDebtRepaid < accountPrimeStorageValue) {\n                // If the net debt change is greater than the debt held by the account, then only\n                // decrease the total prime debt by what is held by the account. The residual amount\n                // will be refunded to the account via a direct transfer.\n                netPrimeDebtChange = accountPrimeStorageValue;\n                finalPrimeDebtStorageValue = 0;\n\n                int256 primeCashRefund = pr.convertFromUnderlying(\n                    pr.convertDebtStorageToUnderlying(netPrimeDebtChange.sub(accountPrimeStorageValue)) //<--------@audit always ==0\n                );\n                TokenHandler.withdrawPrimeCash(\n                    account, currencyId, primeCashRefund, pr, false // ETH will be transferred natively\n                );\n                didTransfer = true;\n            } else {\n```\n