A scholar by the name of Shen Fengyu from Hangzhou made his living as a secretary in the judiciary of Wukang County.
One day a memorandum demanding the capture of a pirate by the name of Shen Yufeng passed down through his office. One of the other secretaries in the office saw the opportunity for a joke and quickly reversed the characters for Feng and Yu with red pen. The message now demanded the capture of Shen Fengyu.
The mischievous secretary showed Shen Fengyu the document, saying, "They're coming to get you! They'll be here to arrest you any minute!"
Shen didn't see anything funny in this at all. He snatched the memorandum and burned it.
That night he dreamed he was arrested by the ghost police. They rushed into his room, tied him up, and locked him in the city god's temple.
The city god sat in his seat of honor and shouted down at Shen, "So you are that murderous pirate! The blood of many people is on your hands! You really are the lowest form of life!" He then instructed his officers to torture the prisoner.
Shen hastily protested that he was a scholar from Hangzhou and not a pirate, but this only made the city god more angry.
He barked back at Shen, "The Regulations of the Underworld demand that we support our fellow bureaucrats in the Human World. Whenever we receive a memorandum from above, we act on it.
"Today we received a document from Wukang County that clearly identified you as a pirate and called for your immediate arrest. How dare you deny your crimes!"
Shen continued his attempts at defense by explaining how his friend, Yuan, had played a stupid trick by reversing the names, but the city god refused to listen. The order was then given that Shen be beaten with thick cudgels as punishment.