Ellen Pompeo recently opened up about her time in “Grey’s Anatomy” and said that there was an instance wherein she wanted out. However, the actress who plays the role of Dr. Meredith Grey decided to stay.

While speaking with Taraji P. Henson for Variety, Pompeo said that there were actually several moments when she wanted to get off the bus. After all, her first 10 years on the show was packed with serious culture issues, bad behavior and a toxic environment on set.

But after Pompeo had her children, she realized that it’s not about her anymore. Since she needed to provide for her family, she decided to stay on the show.

“At 40 years old, where am I ever going to get this kind of money?” she said. “I need to take care of my kids. But after Season 10, we had some big shifts in front of the camera, behind the camera. It became my goal to have an experience there that I could be happy and proud about because we had so much turmoil for 10 years. My mission became, this can’t be fantastic to the public and a disaster behind the scenes,” she added.

Pompeo said that she worked with executive producer Shonda Rhimes in rewriting the ending of “Grey’s Anatomy.” After the changes were put in place, Pompeo’s onscreen partner, Patrick Dempsey, decided to leave the series in Season 11.

At that time, the studio and the network became concerned about the fate of “Grey’s Anatomy.” They thought that the show wouldn’t survive without its male lead. Pompeo made it her mission to make sure that the series would survive, and it did.

During the interview, Pompeo also said that she and Dempsey didn’t receive the same pay during the first seasons of “Grey’s Anatomy.” Since Dempsey already starred on another television show, he was receiving almost double.

“He was being paid almost double what I was in the beginning,” Pompeo said. “He had a television quote. I had never done TV.”

“Grey’s Anatomy” is slated to return to ABC for its 16th season this year. But Pompeo previously hinted that this could be the end for the franchise.

Ellen Pompeo Ellen Pompeo in People's Choice Awards 2015 Red Carpet. Getty Images