An incorrect court order issued against the founder of Megaupload has been declared “null and void” by a New Zealand judge. The legal bungle could lead to the return of the internet tycoon’s multi-million dollar fortune.

New Zealand police reportedly made a procedural error and applied for the wrong kind of restraining order. As a consequence internet mogul Kim Dotcom, formally known as Kim Schmitz, was not afforded the opportunity to defend himself prior to the seizure of his assets eight weeks ago by the police.

The Judge presiding over the case, Justice Judith Potter said on Friday that the order carried no “legal effect” and the case would have to be re-evaluated, the NZ Herald reports.

Potter said she would soon rule on whether the mistake meant the internet mogul should get his property back.

Kim Dotcom’s legal defense team had previously challenged the restriction order, calling it unlawful and demanding that their client’s assets be released.

Accused on multiple accounts of internet piracy, Dotcom was arrested by the New Zealand authorities on January 19. During the subsequent police raid on his mansion, millions of dollars of assets were confiscated, among them bank accounts, properties, jet-skis and dozens of cars.

It also coincided with the shut-down of the file sharing website Megaupload on grounds of copyright violation.

The seizure left Dotcom without any funds to mount a legal defense.

The internet tycoon was released on bail on February 22 and is currently awaiting extradition to the US, where he will be put to trial for charges of copyright infringement, racketeering and money laundering.

Megaupload was one of the top 20 visited sites on the internet and constituted four percent of the overall internet traffic. The US department of justice believes that its owners earned over $175 million in illegal revenues by selling ads and subscriptions on the site.

A provisional court date for Dotcom’s extradition hearing has been set for August 20.