Former child actor Drake Bell has pleaded guilty to felony attempted child endangerment and a misdemeanor charge of disseminating matter harmful to juveniles.

Bell, former star of Nickelodeon’s Drake and Josh, entered the guilty plea via Zoom in a Cleveland, Ohio court on Wednesday.

According to Cuyahoga County Prosecutor’s Office, Bell, 34, engaged in an inappropriate online relationship with an underage girl that, “at times, was sexual in nature.” Prosecutors say the girl, then 15, also attended Bell’s 2017 concert in Cleveland.

The attempted endangering children charge relates to the concert, where Bell “violated his duty of care and, in doing so, created a risk of harm to the victim,” according to prosecutors. The dissemination charge ties back to Bell’s online correspondence with the victim.

Bell faces up to two years in prison, and his sentencing is scheduled for July 12th.

Upon his arrest last month, Bell initially entered a not guilty plea. His attorney, Ian Friedman told The Associated Press that it will be revealed at sentencing changed his plea to guilty.