A Texas corrections officer was reinstated at his job at a Huntsville prison after an investigation found that his Facebook friendship with an inmate was not grounds to remove him from his post.

Heath Lara, a sergeant with the Huntsville unit of the Texas Department of Criminal Justice, was Facebook friends with Gary Wayne Sanders, an inmate in the Huntsville unit serving 72 years for a murder in Fort Worth, the Austin American-Statesman reported.

Lara was friends with Sanders because the men were high school classmates. The prison officer contended he did not know Sanders was an inmate and his union representatives successfully argued for his reinstatement.

“There’s almost no way a correctional officer — or anyone else for that matter — can tell if any one of their Facebook friends are convicts, parolees or ex-convicts,” Lance Lowry, president of a Huntsville local of the American Federation of State, County and Municipal Employees – the union that represents prison guards, told the Austin American-Statesman. “With more than a million people in Texas now incarcerated, on parole or probation, there’s a pretty good chance some of those Facebook friends are or have been in the criminal justice system at one time.”

Texas has rules against fraternizing between prison officers and convicts, which includes Facebook, the paper reported. It was those rules that cost Lara his job in May before he was reinstated two weeks ago.

State officials are no longer considering being Facebook friends a violation of the fraternizing policy, according to the paper.

“With 40,000 employees and 154,000 convicts, Texas prison officials concede privately there is probably no practical way to monitor everyone’s Facebook accounts,” wrote the paper’s Mike Ward. “An undetermined number of prisoners have Facebook pages these days, including some death row inmates, established and maintained by friends on the outside.”

While Lara was reinstated, other corrections officers didn’t have the same fate, with at three other colleagues either being fired or reprimanded for friending an inmate or ex-convict on Facebook, the American-Statesman reported.

Lara’s case may be different because of the circumstances surrounding why he was friends with Sanders. The corrections sergeant also has an unblemished record outside of the Facebook matter, according to the paper.