Lindsay Lohan was 48 minutes late to court Monday morning after rescheduling her flight from New York to Los Angeles Sunday evening over her plane potentially having a fuel leak.

The actress faced 240 days in jail over charges that she lied to police over her 2012 car accident on California's Pacific Coast Highway. The incident put her at risk of violating her 2011 probation that stemmedfrom her conviction of a jewelry theft.

Fortunately for Lindsay her tardiness worked in her favor once again, as her attorney, Mark Heller, used the extra time to revisit plea bargain negotiations with prosecutors that broke down last week.

Heller was able to work out a deal that would send Lindsay to a mandatory 90-days in a rehab facility. In addition to fines and the restitution she'll haveto pay the driver of the other vehicle she hit with her Porsche, she'll have to complete 30 days of community service and undergo psychotherapy for 18 months.

Lindsay was able to stay away from any jail time in exchange for pleading no contest to charges of lying to police and reckless driving.

She also admitted to violating her probation and was sentenced to 180 days in jail. That sentence was suspended though, on the condition that she completes her rehab stay and community service. She'll also be subject to random drug testing.

As for her original flight -- the plane made it to L.A., but it did stop in Las Vegas for refueling.