Things you shouldn’t do if you’re an auditor: Go on family vacations with your client, or date them.

Two auditors at Ernst & Young have cost the company more than $9 million for doing just this. The US Securities and Exchange Commission said EY was paying the fine because two of the firm’s partners had gotten too close to their clients and violated rules that ensure objectivity, while EY audit reports maintained the company’s independence.

This is the first time an auditor has been fined for failing to maintain their independence, the SEC said.

From January 2012 to March 2015, Gregory Bednar, a senior partner on the engagement team, broke company rules after he was told by EY to improve a relationship with a New York-based client because it was a “troubled account.” The SEC investigation (pdf) offers some more tips on things you shouldn’t do if you want to keep your accountant job:

Bednar and the company’s CFO stayed overnight at each other’s homes on multiple occasions and traveled together with family members on overnight trips with no valid business purpose, and they exchanged hundreds of personal text messages, emails, and voicemails during the auditing periods. Bednar also became friends with the CFO’s son and often treated them to sporting events and other gifts.

The SEC report also says Bednar ran up entertainment expenses of $109,000 over three years of audits. They took trips all over the US, including visits to vacation homes in South Carolina and football games in Green Bay, Wisconsin.

EY has been fined just under $5 million for this and Bednar must pay $45,000. He’s also been suspended from practicing as an accountant and left EY in June 2015, after working there for almost 33 years. The chief financial officer at the other company retired in 2015.

The rest of the fine is because Pamela Hartford “maintained a romantic relationship” with Robert Brehl while she was on the engagement team auditing his company between March 2012 and June 2014. The couple lived in different cities but saw each other at work events. Hartford and Brehl have to pay $25,000 each (pdf).

They and Hartford’s supervisor Michael Kamienski, who knew of the relationship but didn’t perform an inquiry, have all lost their jobs.