A Florida appeals court ruled on Wednesday that a former FBI agent connected to Boston mobster James "Whitey" Bulger should be released from prison.

John Connolly, who is currently service a 40-year prison sentence for second-degree murder, could potentially be released all because of a technical error made by Miami-Dade prosecutors nearly six years ago, reports the Miami Herald.

The Third District Court of Appeals ruled that the statue of limitations had run out for the 1982 ordered murdered of World Jai-Alai President John Callahan. The 73-year-old Connolly will have to remain in prison until the appeals process is completely exhausted.

Callahan was murdered because he was planning on implicating Bulger in the murder of Roger Wheeler, who was the president of the company before Callahan, a hit man claimed in testimony.

This was the second round of appeals, after the court initially upheld the conviction three years ago, according to The Associated Press.

Connolly's lawyers have continued to argue that prosecutors should not have tacked on a firearm claim, which allowed them to slip around the statute of limitations.

Chief Judge Frank A. Shepherd and Judge Richard J. Suarez said in the majority decision, "Connolly's conviction for second-degree murder with a firearm should not have been reclassified to a life felony in order to circumvent the statute of limitations." They added, "Without the fundamentally erroneous reclassification, the first-degree felony of second-degree murder was time-barred."