You’ve just built the perfect snowman: top hat, carrot nose, corncob pipe, the works. You whip your iPhone out to snap a photo for your Instagram feed, but the screen won't come on. It was fully charged when you left the house, so what happened? Did the cold weather kill your phone?

While this scenario is bleak—the dead-as-a-brick phone, not your empty Instagram feed—there's no reason to panic, says Matt McCormick, owner of Jet City Device Repair in Chicago and Seattle.

“In the winter, especially on iPhones, it’s easy to see your phone simply die if you’re standing out in freezing weather,” he says. “I personally had this happen a few years ago when I was hiking with some friends in Wisconsin. The cold weather made the phone unusable as long as I was outside.”

In fact, “bricked” phones aren’t as common as you may fear. In the traditional software sense, a phone “bricks” when “the hardware is perfectly fine but the software has the phone locked up and unusable,” McCormick says. The most common causes of that are when someone tries to jailbreak his or her phone—hack it to access its master files or install third party apps—or if someone stops an update partway through the process. Neither of those are weather dependent. (While a bug on the new iPhone X did cause the phone’s screen to freeze when exposed to cold weather, Apple has since released a software fix to solve the problem. Other times, catastrophic hardware failures can permanently brick phones.)

“However, we do frequently see phones that appear dead,” McCormick says. Some common causes of that include water damage, a broken or blocked charging port, and the occasional software glitch that prevents the screen from coming on. But the most destructive and widespread is a bad battery.

Rechargeable lithium-ion batteries, the kind used in iPhones, are vulnerable and volatile. According to Apple’s guidelines, iPhones should be used between 32°F and 95°F. Some tests suggest that the phones’ batteries can stop discharging electricity altogether when in frigid temperatures.

“Low- or high-temperature conditions might cause the device to change its behavior to regulate its temperate,” Apple says. “Using an iOS device in very cold conditions outside of its operating range might temporarily shorten battery life and could cause the device to turn off. Battery life will return to normal when you bring the device back to higher ambient temperatures.”

If your phone dies while you are in the cold weather, the solution is to keep your phone warm or warm it back up. That’s how McCormick ultimately revived his seemingly dead iPhone: He hiked inside.

To prevent this from happening when you’re outside, keep your phone in a sturdy case and store it close to your body—in a pants pocket, for example, instead of in a coat pocket. And while force-closing apps isn’t recommended for saving battery, it’s still a good idea to look at what’s using your power both onscreen and in the background. (You can check to see how much power your apps are using by following these instructions.)

If your phone screen still goes black, wait until you’re back inside and the phone has warmed up before trying to turn it on. Also, go easy on the charging while the phone is still cold—Battery University says never to charge consumer grade lithium-ion batteries in temperatures below freezing, which can cause permanent damage.