Have you ever nervously swiped your debit card, silently hoping you have enough money in your account to cover the purchase?

Having a purchase declined isn’t just embarrassing. If the item is a necessity, you might have to go without it until you can transfer more money to your account.

In situations like these, enrolling in your bank’s overdraft protection program can help. But these programs aren’t always straightforward. Hefty fees can make overdraft protection an expensive option.

Overdraft protection is a bank service that allows you to make purchases, even if you don’t have enough money in your account. In many cases, consumers will link another account (such as a savings account or credit card) to their checking account.

If you overdraw from your checking account, your bank will transfer money from your connected account in order to cover the purchase. But this might result in a transfer fee.

In other cases, overdraft protection can mean that your bank covers the purchase and allows your checking account to dip below zero. By doing so, you avoid embarrassing moments at checkout and can rest easy knowing your card won’t get declined, but it could cost you.

Banks charge a fee for allowing a purchase to go through even if you don’t have the cash to cover it.

Exact amounts vary by bank, but the median overdraft fee is $34, according to the Consumer Financial Protection Bureau. While that may not seem like a lot to be “protected,” CFPB research states that consumers who opt-in end up paying more in fees than consumers who do not.

Not only that, but banks are profiting big time from your overdrafts, raking in billions of dollars each year just in overdraft fees.

If you overdraft, it’s not just a one-two punch. “When someone incurs an overdraft fee, it’s more common than not to get hit with another one in the same day,” explained Tim Hong, CMO of financial app MoneyLion. At $34 a pop, a few purchases could cause you to pay over $100 in fees.

While overdraft protection should protect you, it can be more harmful in some instances.

“Overdraft protection isn’t ‘protection’ so much as it is an annoying fee,” said Hong. Those fees can add up. Plus, since you know transactions will go through no matter what, you might be less vigilant with your spending.

By law, you cannot be automatically enrolled in overdraft protection. You must to opt-in for coverage. To avoid these charges, simply decline the policy.

If you think you’ve already opted out of this service with your bank, it doesn’t hurt to double-check. Many people aren’t aware they’re already signed up for overdraft protection.

Many banks, like Chase and Bank of America, have simple online instructions for cancelling overdraft protection. Calling your bank’s customer service line will likely get the job done too.

If you want to avoid overdraft fees, opt out of overdraft protection. However, in order to avoid other fees for bouncing checks, you need to stay on top of your finances. It’s important to monitor cash flow so you know what’s coming in and what’s going out.

Monitor your accounts closely so you don’t overdraw. Using your bank’s mobile app, it’s easy to check your account balances daily. You can also set calendar alerts when big bills hit your account, so you know when your balance might be lower than normal.

Additionally, you can check out what bank fees you’ve already paid at BankFeeFinder.com. You might be surprised at how much you give to the bank each year in fees. If anything looks amiss, call you bank and see how you can reduce the charges.

If overdraft fees have been an issue for you in the past, consider using a bank account that doesn’t have them, like Capital One 360 or Simple.

Overall, just stay on top of your account balances and monitor your spending. You should be able to avoid these pesky fees with some due diligence.