A Central Texas man who was busted for burglary and then committed another burglary while behind bars in the Coryell County jail was sentenced Wednesday.

James Lee Anderson, Jr., 32, was jailed on Feb. 10 in lieu of bonds totaling $195,000 on a list of charges including bail jumping, failure to appear, unauthorized absence from a corrections facility, drug possession, burglary of a habitation, unauthorized use of a motor vehicle, theft, disorderly conduct and driving with an invalid license, according to online records.

In June, another burglary charge was added to the list after he stole a bunch of commissary cards—the debit-like cards inmates use to make commissary purchases--“and went back inside the general population area and began handing them out to inmates like he was Robin Hood,” Assistant District Attorney Megan Pepper said Wednesday.

Anderson had managed to prevent a door from locking after holding it open for a guard who came into the commissary with a box, she said.

He then sneaked into the hallway where there was a large box of commissary cards and grabbed a big handful, she said.

On Wednesday, Judge Trent Farrell, in 52nd District Court, ordered Anderson to serve 18-months concurrently on two state jail felony charges including burglary of a building and unauthorized absence felonies, and eight years on the 3rd-degree felony charge of failure to appear.

Anderson is now awaiting transfer from the Coryell County Jail to a Texas Department of Criminal Justice unit.