You think you’re fine to drive and you walk to your car, which is parked down the street. When you sit down in the front seat, though, you realize that you’re definitely impaired. Not wanting to get a DUI or get into an accident, you put the seat back and go to sleep.

It sounds like you did the right thing, but you can still get a DUI. If the police think you were recently driving or intending to drive, they can still arrest you. It works this way to keep people from pulling off of the road and pretending to sleep to get out of charges. So, if an officer knocks on the window and wakes you up, you could be in legal trouble.

There are a few things you can do to help your case. For instance, it’s wise to lay down in the back seat to go to sleep, rather than putting the driver’s seat back and sleeping up front. That way, it’s clear that you really only meant to sleep and did not plan to drive. It’s also clear that you didn’t just stop your car 30 seconds ago.

A more drastic measure is to take your keys out of the ignition and put them in the trunk. When the officer arrives, you can then demonstrate that you weren’t driving because your keys are not even in the passenger cabin of the car.

These tactics can help, but they’re not guaranteed to get you out of an arrest. If you do wind up facing DUI charges, make sure you know what next steps to take.