At sentencing, the defendant, in effect, moved to withdraw his plea of guilty. The defendant’s right to counsel was adversely affected when his attorney, in effect, became a witness against him and took a position adverse to him with respect to the motion at sentencing (see People v Dixon, 63 AD3d 957, 957 [2009]; People v Bedoya, 53 AD3d 621, 621 [2008]; People v Armstead, 35 AD3d 624, 626 [2006]; People v Bryant, 22 AD3d 676, 677 [2005]). The Supreme Court should have assigned a different attorney to represent the defendant before it determined the
