A Brooklyn judge has ruled that an ex-JetBlue pilot, who recently got in trouble for allegedly flying a passenger plane drunk between Florida and JFK Airport in 2015, won't have to stop drinking altogether as part of his bail agreement.

"He does like to have a glass of wine once in a while with his dinner," Dennis Thomas Murphy Jr.'s defense lawyer Neal Comer said in court Tuesday. "He's not an alcoholic now."

Murphy's also reportedly been known to blame the results of an unfavorable Breathalyzer test on the gum he was chewing.

According to the News, Murphy was selected for a random alcohol test on April 21st last year, after flying 151 passengers from Orlando to JFK. He blew a .11 BAC, breaking the .10 threshold for pilots. Earlier in the day, Murphy had flown another 119 passengers from JFK to Orlando.

His co-pilot later told investigators he saw Murphy “drinking an unknown beverage from a cup” before and during the two flights. He's since been charged with flying under the influence, and posted $50,000 bond.

Murphy resigned after that debacle, and was stripped of the medical certification needed to fly a plane. The News reports that he's now working as a substitute teacher, and has the right to relax within reason—an exception to the typical bail rules—so long as he's willing to submit to regular Breathalyzer tests from the comfort of his home. He's also facing a maximum of 15 years in prison.