When The Good Wife star Julianna Margulies received an Emmy for Outstanding Lead Actress in a Drama last night, she gushed, “What a wonderful time for women on television!” Yes and no, Julianna. Yes and no.

On the one hand, the competition in Margulies’ category was fierce — and it didn’t even include the many talented ladies on Orange Is the New Black. And yet, a number of incidents during the rest of the awards show indicate that the TV industry — though it may be kinder to women than the film industry — still has a long way to go.

There were two moments in particular that made me squirm during the broadcast: the first was when Modern Family’s Sofia Vergara was literally placed on a pedestal to distract from the obligatory boring speech by the chairman of the Academy of Television Arts and Sciences. Critics rightly reacted with outrage. To quote my colleague Sarah Begley: “Maybe it benefits women like Vergara to play along with jokes like this, but there’s no excuse for the Academy to engage in such a blatantly sexist trope. It does a disservice to Vergara’s skills as an actress and comedian to pretend — even in a self-conscious way — like she’s just a body. Sure, it was self-aware – but a self-aware wink doesn’t work like a get-out-of-jail-free card.”

Sofia Vergara, left, and Television Academy CEO Bruce Rosenblum speak on stage at the 66th Primetime Emmy Awards at the Nokia Theatre L.A. Live on Monday, Aug. 25, 2014, in Los Angeles. Vince Bucci—Invision/AP

And then there was Stephen Colbert’s acceptance speech. When he thanked his writers (who won last week for Writing in a Variety Series), he said, “I’m so proud of those guys — and one woman.” When the audience began to laugh, he shrugged and said, “Sorry for that, for some reason.” I want to give Colbert the benefit of the doubt: the network the Colbert Report is on, Comedy Central, has actually been working hard to promote funny women on its network as of late, including Amy Schumer and the ladies of Broad City. (Even Drunk History has been highlighting some little-known kick-ass women.) But his nonchalant joke does touch on the sad fact that the gender gap persists in the television industry: the Writers Guild of America published a report in June that showed women made up just 27% of all TV writers in 2012 and were paid 92 for every dollar earned by male writers.

And it’s not just writing where women are underrepresented: only 26% of the Emmy nominees this year were female. The problem was most acute among the prestige dramas, where the shows actually expected to have a chance at taking home the big prize this year — Breaking Bad and True Detective — didn’t have any women competing in the lead actress category. NPR writer Linda Holmes perhaps said it most succinctly when she tweeted last night:

The drama roles women are nominated for usually involve them being someone’s wife (Robin Wright in House of Cards, Julianna Margulies in The Good Wife, and Michelle Dockery in Downton Abbey) or mistress (Lizzy Caplan in Masters of Sex, Claire Danes in Homeland, Kerry Washington in Scandal). It may be a little unfair to boil down many of these empowered characters — lawyers, scientists and CIA operatives — to these categorizations: The Good Wife’s title is meant ironically after all. But “wife” or “girlfriend” continues to be an essential descriptor for these characters in a way that isn’t true of their male counterparts. As I wrote last year, all of TV’s strongest female characters seem to share one infuriating flaw: they excel at their jobs until they make some terrible decision because of a man. Their main struggle isn’t with duty or morality, as with the nuanced characters that earned Best Actor nominations: it’s about overcoming their hormones to make the right decision.

Actress Julia Louis-Dreyfus, winner of the Outstanding Lead Actress in a Comedy Series Award for Veep (Episode: "Crate"), poses in the press room during the 66th Annual Primetime Emmy Awards held at Nokia Theatre L.A. Live on August 25, 2014 in Los Angeles, California. Jason Merritt—Getty Images

It’s not all doom and gloom for women. In comedy, women like Veep’s Julia Louis-Dreyfus, Orange Is the New Black’s Taylor Schilling and even Lena Dunham (no matter what you think of Girls) are getting to play more interesting, complicated roles than were available for women just a few years ago. Those three shows don’t feel the need to shine the spotlight on the male characters, when it’s clear that the women are the true stars.

And older women are getting their moment on television, proving that turning 40 in Hollywood is no longer a death sentence. Actresses over 40 dominated the nominations, and that same age bracket won in all the major categories. (Julianna Margulies, Anna Gunn, Jessica Lange, Kathy Bates, Julia Louis-Dreyfus and Allison Janney took home the women’s acting awards).

Things are even looking up behind the camera. Last night, Moira Walley-Beckett won an Emmy for her Breaking Bad episode “Ozymandias,” which was arguably the best, most haunting hour of television in the last year. Walley-Beckett became the first solo woman to win the award in the Drama category since 1994 — all other women who have won since then co-wrote episodes with men. As I wrote earlier, the woman’s touch was just what the testosterone-fueled show needed to add a bit of heart at the end of the season: it raised the emotional stakes when Walter kidnapped his daughter from his wife, Skyler. Even as shows about anti-hero men like Breaking Bad, Mad Men and Dexter come to a close, a new crop of similar shows seem to be emerging: The Knick, Ray Donovan and House of Cards, to name a few. If we have to live in a world where almost all of the prestige dramas are about “Difficult Men,” shows where women usually play second fiddle, then let it be a world where a woman has an Emmy on her shelf for penning the best episode in that genre.

So yes, Julianna, there’s a lot to celebrate. But TV still has a long way to go: let’s not confuse “good” with “wonderful.”

Write to Eliana Dockterman at eliana.dockterman@time.com.