It was hard to know how “Orange is the New Black” would — or could — come back after its fifth season, which was as ambitious as it was ultimately disastrous. The show became as scattered and chaotic as the inmate protest-turned-riot it was trying to depict, sending every character spinning seemingly for the sake of it. By season’s end, two guards had died and the inmates were rounded up and shipped off to different prisons.

It’s understandable why, after four similarly structured seasons, the show was tempted to slow the story down to follow just a few extraordinary days in the characters’ lives. But in the end, the result was too thrilled with its own daring to make much sense. So the question was how Season 6 could recover without ditching its ongoing storylines and starting over with a whole new cast (which would be easy, given the constant revolving door of inmates).

Thankfully, Season 6 does its damndest to reset the show back to some of the dynamics that have worked best for it from the beginning. The first few episodes narrow the show’s focus to the smaller group of inmates going to the maximum security prison (or “max”) just up the street, including heavyweight characters like Taystee (Danielle Brooks), Piper (Taylor Schilling), Gloria (Selenis Leyva), Suzanne (Uzo Aduba), Nicky (Natasha Lyonne), and Red (Kate Mulgrew). Max has loomed over “Orange” as an omnipresent threat, and getting to see it in action ends up restoring a kind of order the show desperately needed.

The “riot girls” are largely split up into rival sections of the prison and have to adjust to being relegated back to the bottom of the food chain. Some end up in “C block,” where they have to find their place in an ecosystem built up over decades by Carol (Henny Russell), a lifer who quickly figured out how to make herself a kingpin. Complicating matters is the fact that her sister Barbara (a surprise Mackenzie Phillips) runs things over in “D block,” and the two of them often use the younger inmates surrounding them as pawns in their ongoing war of extreme pettiness.

The sisters are fun — especially when played by Ashley Jordyn and Lauren Kelston in their ’70s era flashbacks — but the season spends too much time with their deputies, who never quite prove as charismatic as any of the original characters. Short-tempered Madison “Badison” Murphy (Amanda Fuller) stalks around C block with a thick Boston accent and not much else, while “Daddy” (Vicci Martinez) flirts with a dead-eyed Daya (Dascha Polanco) in a plot that has trouble ever getting off the ground.

Another aspect of this season that never quite gels is its treatment of those who work for the prison, whose vacillating sympathies and/or disgust for the inmates have always made them some of the more frustrating characters on the show. That holds more true than ever after the riot, with some doubling down on their hatred and others more torn about their jobs than ever. The best of these include McCullough (Emily Tarver), suffering PTSD after the riot, and a conflicted max guard whose unexpected ties to Taystee’s past make for the season’s best flashback sequence by a mile. On the flip side, Matt Peters’ Luschek inexplicably gets way more time to do exactly what he’s always done, while the overarching threat of corporate injustice from a furious Linda (Beth Dover) runs in repetitive circles right until the very end.

If this sounds like the season devotes an awful lot of time trying to make sure everyone gets as much screentime as possible, well, you’re not wrong. With a finale running over 80 minutes long(!), there’s no shortage of story. But there’s one plotline in particular that illustrates a particularly exasperating storytelling choice on the show’s part. After trying so desperately last season to hold people accountable after a guard killed Poussey (Samira Wiley), Taystee ends up on trial for a crime she didn’t commit. Former Litchfield warden Caputo (Nick Swarden), wracked with guilt over his botched response to Poussey’s death, makes it his mission to get justice for Taystee now. Given the fact that this is a huge, devastating moment in Taystee’s life — not to mention how excellent Brooks is at tackling this tricky material — it’s baffling that the show chooses to more closely follow Caputo stumbling his way into decency behind the scenes. In a season running well over 13 hours long, and with plenty of filler material spread around the cast, there easily could have been an entire episode devoted to this trial if only the show got a more judicious edit.

So, yes, Season 6 is indeed a marked improvement on Season 5. In fact, it’s even pretty good. But it also ends up highlighting the series’ overall weaknesses, making it more clear than ever just how frustrating it is when a show with this much promise loses sight of what could make it great.

Drama series (all 13 episodes watched for review). Premieres July 27 on Netflix.

Cast: Taylor Schilling, Uzo Aduba, Kate Mulgrew, Laura Prepon, Laverne Cox, Dascha Polanco, Danielle Brooks, Dale Soules, Selenis Leyva, Taryn Manning, Yael Stone, Laura Gomez, Jackie Cruz, Adrienne C. Moore, Elizabeth Rodriguez, Jessica Pimental, Nick Sandow.