Much like the third installment of the Pirates of the Caribbean series, the fourth film On Stranger Tides was initially almost banned in China—but censors objected to this 2011 sequel for a different, odder reason. Beginning in 2003 with The Ring helmer Gore Verbinski’s surprise sleeper hit The Curse of the Black Pearl, the Pirates of the Caribbean movies soon became one of the twenty-first century’s most enduringly popular blockbuster franchises despite the middling quality of later installments.

The huge popularity of series star Johnny Depp’s Jack Sparrow ensured that audiences flocked to see the Pirates of the Caribbean sequels, but not everyone was thrilled with the swashbuckling adventure movies. The third Pirates of the Caribbean movie, the original trilogy closer At World’s End, was nearly denied a release in China due to the movie’s depiction of the region as a crime-ridden underworld.

Related: POTC: Jack Sparrow’s Missing Scars Made His Backstory Darker

Chow Yun-Fat’s depiction of Captain Sao Feng as a villainous murderer ensured that Pirates of the Caribbean: At World’s End, like many blockbusters and almost all James Bond movies, was almost not granted a release in China. However, the next film in the series, 2011’s belated sequel On Stranger Tides, didn’t center on China at all and still managed to earn the ire of the films’ censorship board, with the Pirates of the Caribbean installment almost being denied a release. Unlike the third film’s ban (and a lot of blockbuster censorship), this was not actually due to a political issue. The Chinese censors didn’t care for On Stranger Tides' plot frequently referencing ghosts, the occult, and the afterlife, something would later contribute to numerous high-profile flops like R.I.P.D and Ghostbusters.

Sam Claflin and Astrid Berges-Frisbey in Pirates of the Caribbean On Stranger Tides

While it’s not common for Chinese censors to ban movies for flippantly depicting ghosts, revival, and occult practices, it’s not unheard of given the conservative views held by some of the country’s citizens. More often than not, movies that center around ghosts and the afterlife are given the option of a Chinese cinematic release but typically underperform due to widespread public disinterest in the themes. This was eventually the case for On Stranger Tides, as the fourth Pirates of the Caribbean outing was granted a cinema release but nearly banned, perhaps due to the third film leaving a lingering distaste for the country’s censors.

That said, it was likely not impossible for Chinese viewers to get their hands on a copy of Pirates of the Caribbean: On Stranger Tides even before its eventual release, as the country’s booming pirate DVD trade (ironically) meant few films were unavailable for viewing even if they did not secure a formal theatrical release. The fact that Pirates of the Caribbean's third sequel On Stranger Tides was not outright banned, along with the next year’s loosening on James Bond censorship (with 2012’s Skyfall being edited rather than denied a release), illustrated the increasingly lax approach to censorship in the nation.

More: POTC: Why Cutler Beckett Left Davy Jones’ Heart On The Flying Dutchman