Problem with Curve Modifier on object array when I try to apply Curve Modifier on my air duct object, the corners get weird, no matter how many cuts the object has.

Can somebody explain how I can fix it? Pls
Curve modifier needs a subdivided,  the more the better, mesh to work as expected. Instead, use Bevel object which is a bezier circle with handles set to vector to form a square. Then rotate it and make a rectangle.