In your case:
170$ = 130$ (what you sent) + 40$ the remaining (sent to your change address).
Exactly. Simple as that OP, this is the right answer. When you make a transaction, the input goes to a new change address. It's a part of Bitcoin's functionality that improves privacy. You should still see the other $40 in your wallet and you should be able to validate this answer by using a block explorer to see how it works.
If you have $170 in an address within your wallet and send $130 to another address, $130 will go to the recipient and $40 will go to another address in your wallet which you can spend later. Similarly, if you had $500 and sent $200 to someone and $100 to someone else (in the same transaction), the other $200 would go to another address in your wallet.