Triple Frontier director J.C. Chandor was willing to do whatever it took to keep Ben Affleck in his film – even if that meant waiting six months for the star to finish rehab

Triple Frontier director J.C. Chandor was willing to do whatever it took to keep Ben Affleck in his film – even if that meant waiting six months for the star to address his battle with alcoholism.

Chandor tells PEOPLE Affleck, 46, was already signed on to do the movie when he began having “health issues,” prompting a heart-to-heart discussion about whether he could eventually return to the cast.

“The two of us had a little bit of a heart-to-heart where I asked, ‘Are you really gonna come back? We’ll wait for you if you are,’” Chandor recalls. “And he was so committed and so I’m so glad that I did because this part felt like it was the right part for him right now… We waited six months, and it was worth it.”

Ben Affleck
| Credit: Pascal Le Segretain/Getty

Chandor said the delay even had a silver lining in that it allowed star Oscar Isaac to sign on after his schedule opened up.

“It was meant to be,” Chandor says. “This film felt to me like we got the people that wanted to be here.”

Red Carpet Arrivals For The World Premiere Of "Triple Frontier" In NYC
Ben Affleck and J.C. Chandor
| Credit: Splash News

The Netflix film also stars Charlie Hunnam, Garrett Hedlund and Pedro Pascal as a group of five former special forces operatives who reunite to steal a drug lord’s fortune.

“I think it was cool with this group because this movie was about them coming back together, a reunion…they all knew each other,” Chandor says. “So it was fun, there were all these relationships within them.”

Netflix World Premiere of TRIPLE FRONTIER
Garrett Hedlund, Charlie Hunnam and Ben Affleck
| Credit: Astrid Stawiarz/Getty

Affleck completed a 40-day stay at a treatment center in October, he revealed in an emotional statement on Instagram.

“Battling any addiction is a lifelong and difficult struggle. Because of that, one is never really in or out of treatment. It is full-time commitment. I am fighting for myself and my family,” he wrote. “As I’ve had to remind myself, if you have a problem, getting help is a sign of courage, not weakness or failure. With acceptance and humility, I continue to avail myself with the help of so many people and I am grateful to all those who are there for me. I hope down the road I can offer an example to others who are struggling.”

The Oscar-winning actor previously entered rehab in 2001, and, years later, announced he had completed treatment for alcohol addiction in March 2017.

He stopped by the Today show Monday to talk Triple Frontier, and candidly discussed his struggles with alcoholism and how it has affected his family with ex-wife Jennifer Garner. The former couple has three children, Violet, 13, Seraphina, 10, and Samuel, 7.

“Being an alcoholic, it’s part of my life, it’s something that I deal with,” he said. “It doesn’t have to subsume my whole identity and be everything but it is something that you have to work at… I had a problem and I really want to address it and I take some pride in that.”

RELATED VIDEO: Ben Affleck and Ex Lindsay Shookus Are Spending Time Together Again: ‘They’ve Struck Up a Friendship’

He continued, “I hope I’m a pretty good dad. I certainly try very hard. I’m lucky they got a great mom, and she helps out a great deal with making sure that we co-parent in as good a way as possible.”

The actor has recently been spotted spending time with former girlfriend Lindsay Shookus, with whom he split in August, and she was by his side Sunday for the Triple Frontier premiere.

A source told PEOPLE he and the Saturday Night Live producer, 38, “are hanging out again.”

“They have been for over a month now. They still enjoy each other’s company,” the source said.

Triple Frontier will be released in select theaters on March 6 and available to stream on Netflix starting March 13.