On-demand food delivery startup DoorDash has reached an agreement with workers’ rights lawyer Shannon Liss-Riordan regarding a class-action lawsuit that alleged DoorDash misclassified its delivery workers as independent contractors.

As part of the settlement, DoorDash will pay class members of the suit $3.5 million, following the court’s approval. The company has also agreed to pay an additional $1.5 million in four years or when one of three things happen: DoorDash goes public, the company is profitable for a full year or some other company acquires DoorDash at double its current valuation.

In September 2015, Cynthia Marciano and Evan Kissner both separately filed lawsuits against DoorDash, alleging that DoorDash misclassified them and other delivery workers as independent contractors, and therefore violated certain provisions of the labor code.

The named plaintiffs, Marciano and Kissner, will receive $7,500 each and Liss-Riordan will get up to $1.25 million, according to the settlement. The approximately 33,744 class members, which entail all those who worked for DoorDash as independent contractors at some point between September 23, 2011 through August 29, 2016, and completed at least one delivery, will receive payment as part of the settlement.

Those who “were most active” on DoorDash will “receive proportionally higher payments,” the settlement states. DoorDash has also updated its deactivation policy to ensure that all its delivery people retain access to the platform unless they violate the rules of engagement. Before, there was no single source of truth when it came to deactivating people from the platform. Another change is that DoorDash delivery workers will be able to appeal a deactivation if they feel they should not have been deactivated from the platform.

This settlement, however, does not prevent other people from suing DoorDash over this exact same reason in the future. But given that DoorDash worked with Liss-Riordan, the lawyer whose name often shows up on these cases against Uber, Lyft and other on-demand companies, there’s reason to believe that this type of case might be less attractive for complaints in the future. That’s because the resolution they agreed on was not to change independent contractors to employee status, but rather change some policies to improve clarity and ensure more rights for the workers.

“We firmly believe that the autonomy and flexibility Dashers love is made possible by, and consistent only with, their status as independent contractors,” DoorDash General Counsel Keith Yandell wrote on the DoorDash blog. “That said, we feel that this settlement represents a fair compromise, addresses valuable Dasher feedback, and makes changes that will further cement Dashers’ status as independent contractors.”