Tesla can keep its dealerships in the state of New York. An agreement was made between the auto maker and New York Gov. Andrew Cuomo that will allow Tesla to keep its five direct-to-consumer retail stores as long as it doesn’t open any more.

Tesla took the deal and ran to the bank.

As the WSJ reports, any new dealerships Tesla wishes to open would have to abide by a “strengthened dealer franchise law.” In return, New York lawmakers who had previously sought to outlaw Tesla’s current and future retail stores will end their efforts.

This deal is similar to one struck in Ohio earlier this week.

While the measure seems like a stop-gap solution, both Tesla and Gov. Cuomo view it as an acceptable solution that benefits the consumer, Tesla and the franchised dealerships.

Tesla’s unconventional business practices extend all the way to selling its vehicles. Instead of turning to franchised dealerships, it uses company-owned retail stores and service centers. In several states, this practice has come under fire by associations looking out for the dealerships. The company is outright banned from selling its vehicles in some states. But at least in New York, while this measure prevents new stores from opening up, the company can still sell its vehicles to consumers — while continuing to lobby for further change.