A second-grade teacher in Virginia was arrested on Wednesday after attempting to teach his class while drunk.

Michael Corbett, 28, was arrested by the Loudoun County Sheriff's Office for public swearing and intoxication, reports WJLA. According to the sheriff’s office, another faculty member called police around 10 a.m. on Wednesday to report that the Pinebrook Elementary teacher was possibly intoxicated while teaching.

Police revealed to school personnel that Corbett has had previous legal issues. He was arrested in December of 2012 for possession of drug paraphernalia in Garrett County, Maryland.

In December of 2013, he was arrested and later convicted of a DWI in Leesburg, Virginia. In the DWI case, he was sentenced to 90 days and released on probation. He was also charged in April of this year for driving with a suspended license.

Loudoun County School officials say Corbett has been a teacher at Pinebrook for two years and had been in good standing with the system.