A square baler has a baling chamber (10), slots (16) in the top of the baling chamber (10) receiving twines that serve to tie the bales, and a star wheel sensor (18, 20) having a housing (32) mounted on the exterior of the baling chamber and a star wheel rotatably supported by an axle in the housing and passing through one of the slots (16) to contact the crop material of the bale being formed in the baling chamber. In the invention, a deflector (30) is mounted on the baling chamber (10) to extend through the same slot (16) as the star wheel sensor (18, 20) into the path of the twine. The deflector (30) having a region (30b) inclined relative to the slot (16) to as to deflect the twine away from the star wheel and thereby prevent the twine from becoming entangled in the sensor.