He landed himself in court