What changed Disney’s mind? Per Deadline, Horn was impressed with Gunn’s public and private comportment after the firing; the director didn’t blame Disney, and he wasn’t involved in any additional scandals. The narrative that Gunn’s firing had been engineered by right-wing Twitter personalities who were angry about the director’s criticism of President Donald Trump also gained prominence. Plus, Gunn continued to get work—he was hired by Warner Bros. last October to write a new Suicide Squad film for the rival DC Comics movie universe, a project that he’ll complete before returning to Marvel for Guardians 3. In other words, Gunn’s quiet and straightforward handling of the entire situation, combined with the Hollywood establishment’s continued support of him, turned the tide in his favor.

Still, Disney’s reversal illustrates how difficult it can be to determine when a so-called joke is offensive or harmful enough to warrant serious professional consequences. After all, some of Gunn’s tweets (including those that made light of pedophilia and sexual assault) are genuinely uncomfortable to read today, even if they were intended as a Twitter version of shock-jock radio. Gunn openly addressed his earlier mentality: “I viewed myself as a provocateur, making movies and telling jokes that were outrageous and taboo … In the past, I have apologized for humor of mine that hurt people. I truly felt sorry and meant every word of my apologies.”

So what separates Gunn’s tweets from, say, the bigoted Twitter tirade that got Roseanne Barr fired by ABC (another part of the Disney Corporation)? For one, Barr’s invective about African Americans and various conspiracy theories was a years-long problem on her social-media feeds that continued into the present day and that appeared to reflect personal beliefs—weakening Barr’s argument that her tweets were just jokes made “in bad taste.” And unlike Gunn, Barr lost the support of much of her cast and crew, some of whom refused to participate in future seasons of her show. She eventually agreed to let the Roseanne reboot go on without her and with a new name.

It’s worth noting that before ABC finally cut bait, Barr had been insulated by her show’s huge ratings. Massive success can help public figures survive outrage over abhorrent behavior—regardless of their efforts to meaningfully address or apologize for their mistakes. While morality matters in Hollywood, market results do, too. The director and actor Mel Gibson has returned to major studio work despite past incidents of alleged domestic abuse, racism, and anti-Semitism, thanks to his smaller and critically well-regarded film, Hacksaw Ridge. Gibson has generally avoided apologizing or accounting for his behavior as Gunn did, instead often referring to multiple incidents as “one mistake” or “one bad night.” More recently, the Fox News pundit Tucker Carlson faced no fallout from his employer after the progressive nonprofit Media Matters drew attention to a trove of racist and sexist remarks he made between 2006 and 2011 on a Tampa radio program. Carlson—one of the network’s highest-rated hosts—outright refused to “express the usual ritual contrition” about his previous comments and continues to broadcast.