Straighten out (someone or something)

To cause someone’s bad behavior to improve, to organize or fix something that is in confusion or disorder.

I went to the bank to straighten out the problem with my credit card.