Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Barack Obama bantered with late-night television host Jimmy Kimmel Thursday and read mean tweets about himself before addressing the more serious topic of a pattern of racially biased policing in Ferguson, Missouri.

Obama said he was thankful that two police officers who were shot in Ferguson as a protest wrapped up Wednesday survived and are expected to recover.

He called for whoever fired at the officers, wounding one in the shoulder and the other in the face, to be punished, and said those who commit acts of violence are criminals who don't represent the peaceful protesters or the social change they are trying to bring about.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"I think that what had been happening in Ferguson was oppressive and objectionable and was worthy of protest, but there was no excuse for criminal acts," Obama said on on ABC's "Jimmy Kimmel Live!" "And whoever fired those shots shouldn’t detract from the issue. They’re criminals, they need to be arrested."

Protests in Ferguson Thursday night were peaceful and there were no reports of any arrests. The wounded officers were released from the hospital earlier in the day, and police continued to look for suspects in the shootings.

"What we have to make sure of is the folks who disregard and disrespect the other side, people who resort to violence, that they’re marginalized ... but they’re not the majority," Obama said. He added that police officers have an "extraordinarily tough job" and that the overwhelming majority do it professionally.

A Department of Justice report found a culture of racial bias in the city’s police and courts system, and said the city aggressively sought to make money through excessive police stops and fines.

There were lighter moments during Thursday night’s broadcast. Kimmel has made it a practice of making guests endure criticism on Twitter by reading offensive tweets, and the leader of the country was no exception.

One tweet bemoaned the increase in price of a 30-pack of Coors Light and added the familiar joke: "Thanks, Obama."

Another asked, "Is there any way we could fly Obama to some golf course halfway around the world and just leave him there?" Obama, an avid golfer, responded: "I think that’s a great idea."