*Editor's note: This story has been updated to clarify Judge Bert Richardson's ruling in Count One.

The criminal case against Rick Perry moves forward, but a judge’s refusal to dismiss the two-count indictment against Texas’ longest-serving governor was not exactly a slam-dunk win for the prosecutors.

Bert Richardson, the Republican visiting judge presiding over the case, did not give Perry's lawyers the quick happy ending they asked for by ruling that the charges against their client are unconstitutional and tossing out the whole case. Constitutional challenges like that aren't decided before trial, Richardson noted.

"Texas law clearly precludes a trial court from making a pretrial determination regarding the constitutionality of a state penal or criminal procedural statute as that statutes applies to a particular defendant," Richardson wrote. To rule now, the judge reasoned, would call for the court to act “beyond the scope of [its] lawful authority.”

But a closer reading of the 21-page ruling shows that Richardson also pointed to some defects in special prosecutor Mike McCrum’s case at this early stage.

On Aug. 15, Perry was indicted on one count of abusing official capacity and one count of illegally coercing a public servant, after he threatened to veto funds a year earlier to the Travis County District Attorney’s office following DA Rosemary Lehmberg’s drunken driving arrest.

Lehmberg, a Democrat, refused to step aside and Perry vetoed $3.7 million to the state’s public integrity unit, which is housed in the Travis County District Attorney’s office.

In his ruling Tuesday, Richardson, who last November was elected to the Texas Court of Criminal Appeals, had questions about exactly what prosecutors are arguing in each of those counts against Perry.

Count One: Abuse of Official Capacity

The statute in part makes it a crime for a public official to "misuse" government property, in this case, presumably the funds intended for Lehmberg's office. However, Richardson said in his ruling, the indictment fails to explicitly state how Perry misused the funds by exercising his power to veto legislation.

In fact, the indictment on Count One does not use the word "veto" at all.

“The problem, therefore is not what is in Count 1, the problem is what is missing,” Richardson wrote.

Richardson wrote that the Perry defense team failed to object to the wording in Count One and that if Perry's lawyers had done so, then the judge could have ordered prosecutor McCrum to amend that charge with more specificity.

Count Two: Coercion of a Public Servant

The statute makes it a crime to "coerce" a public servant into doing something, but contains a clear exception for public officials acting legally in their official duties. Perry's lawyers argued that the indictment did not “sufficiently” explain why Perry’s actions went outside the bounds of this exception because he was acting in his capacity as governor.

Richardson agreed with Perry's argument.

The indictment does not fully explain why Perry’s actions weren’t protected by this exception, the judge said “thus Count II fails to allege an essential element of the offense, and therefore Count II of the indictment is defective for failing to properly negate the exception to the offense.”

Instead of dismissing the count, however, the judge ruled that he will allow prosecutors to amend it.

Until now, both counts of the indictment have been characterized as felony charges, but Richardson revealed in a lengthy footnote that he does not read the coercion count as a felony, but as a misdemeanor because it is not specified as a felony in the indictment.

“Although it has not been raised by Defendant, the court wishes to clarify its perception that Count II is being alleged as a Class A misdemeanor, not as a third degree felony,” Richardson wrote.

Perry has scheduled a news conference on Wednesday morning to discuss his reaction to Richardson’s ruling. His legal team has filed notice that it plans to immediately appeal the ruling to the Third Court of Appeals.