_JjThe defendant, Kedrick Johnson, appeals from his adjudication and sentence as a third felony offender. For the reasons that follow, we affirm.
The defendant was charged by bill of information with battery of a police officer while in custody, a violation of La. R.S. 14:34.2(B)(2). On September 16, 2010, a jury found him guilty as charged. On October 4, 2010, the State filed a multiple bill charging the defendant as a second felony offender. That same day, the defendant filed a motion for a new trial, a motion for a presentence report, and a notice of appeal. On January 31, 2011, without ruling on the motion for new trial, the trial court sentenced the defendant to five years at hard labor without benefit of probation, parole, or suspension of sentence. On appeal, this Court vacated the defendant’s sentence and remanded the case for resentencing, because the trial court failed to rule on the motion for new trial prior to sentencing.1
On December 19, 2012, the trial court denied the defendant’s motion for new trial. In the meantime, the State amended the multiple bill to charge the | ^defendant as a third felony offender. Following a hearing on the multiple bill, the trial court adjudicated the defendant to be a third felony offender. The trial court vacated the previously imposed sentence and sentenced the defendant to five years at hard labor, ordering the sentence to be served consecutively to the sentences imposed under case numbers 503-317 and 486-949. The defendant timely appealed.
Deputy Jonathan Griffin, a member of the Orleans Parish Criminal Sheriffs Department, Special Operations Division, testified that on December 27, 2009, he was informed by the watch commander at Orleans Parish Prison of an incident involving Deputy Lester Burns who was involved in a physical confrontation with an inmate during visitation. Deputy Griffin met with Deputy Burns and learned that he was supervising visitation and was in the process of escorting the inmates back to the holding cell when the defendant turned and began walking in the opposite direction. When Deputy Burns tried to block the defendant, a physical altercation ensued. Deputy Burns physically restrained the defendant and escorted him to the holding cell; however, when he released the defendant, the defendant struck him in the face. Deputy Burns wrestled with the defendant until another deputy arrived and helped him place the defendant in the holding cell. After Deputy Griffin identified a series of photographs depicting Deputy Burns’s injuries, the photographs were admitted into evidence.
IsSergeant Lester Burns testified that on December 27, 2009, at approximately 3:30 p.m., he was assigned to the visitation *140area at Orleans Parish Prison.2 Once the defendant’s visitation period was over, Sergeant Burns instructed him to return to the holding cell. Rather then proceed to the holding area, the defendant began waving to his visitors and moved towards the window. Sergeant Burns placed his arm .out to stop the defendant from getting any closer to the window, and the defendant struck his arm down and attempted to move past him.
At that point, Sergeant Burns spun the defendant around, put him in a bear hug, picked him up, and walked him over to the holding cell, where another deputy was standing with the key. Sergeant Burns felt that using a bear hug was the least intrusive way of restraining the defendant at that point.
As he carried him, the defendant kept saying, “I’m going to bust you in the mouth.” When Sergeant Burns let the defendant go, he spun around and tried to punch Sergeant Burns, but he was able to duck. Sergeant Burns grabbed the defendant in a reverse-bear hug, which placed him face-to-face with the defendant. At this point, the defendant began to headbutt Sergeant Burns, striking him twice in the right eye. Sergeant Burns sustained a small cut as well as bruising and swelling around his right eye. With assistance, Sergeant Burns was able to restrain the defendant and place him in the cell.
Sergeant Chad Ruiz was the watch commander on the day in question. He reported the incident to the Special Operations Division. Sergeant Ruiz stated that |4he took the photos that were entered into evidence, and that the photographs accurately depicted the deputy’s condition when they were taken.
The defendant testified in his own behalf. He stated that on the day in question, he was visiting with his daughter and her mother. He was seated and using the phone to speak with his visitors when he found himself being choked from behind and dragged away. He had no idea it was Deputy Burns. The defendant felt his life was in danger, and he recalled getting woozy from lack of oxygen, so he struggled to get free. He was still in a choke hold when he was dragged into the holding cell. The defendant claimed he had no idea what precipitated the attack.
A review of the record for errors patent reveals one. The sentence for battery of a police officer while in custody is statutorily mandated to be served without the benefits of probation, parole and suspension of sentence. La. R.S. 14:34.2(B)(2). The trial court in this case failed to restrict the defendant’s five year sentence as to benefits. Nevertheless, this error is automatically corrected by operation of La. R.S. 15:301.1. See State v. Williams, 2000-1725, p. 10 (La.11/28/01), 800 So.2d 790, 799. Thus, the Court need not take any action.
By the defendant’s sole assignment of error he alleges that he received an excessive sentence. A review of the record reflects the defendant did not file a motion to reconsider sentence and did not object to the sentence at the time it was imposed. La.C.Cr.P. art. 881.1 provides that the State or the defendant must make or file a motion to reconsider the sentence at or within thirty days of sentence to preserve an objection to the sentence for appellate review. Additionally, this Court has held that the failure to file a motion to reconsider the sentence or to object in any *141way to the sentence at the time it is imposed precludes a defendant from raising a claim about his sentence on appeal. See State v. McCarthy, 2012-0342, p. 5 (La.App. 4 Cir. 3/27/13), 112 So.3d 394, 397. Thus, the defendant’s claim that he received an excessive sentence is not properly before this Court.
Accordingly, the defendant’s conviction and sentence as a third felony offender are affirmed.
AFFIRMED.
. State v. Johnson, 2011-KA-1496 (La.App. 4 Cir. 11/28/12), 104 So.3d 700, unpub.
. Apparently, Deputy Burns was promoted to sergeant between the time of the offense and the trial date.