A square baler has a baling chamber with slots in the top of the baling chamber for receiving twines to tie bales, and a star wheel sensor having a housing mounted on the exterior of the baling chamber and a star wheel in the housing and passing through one of the slots to contact the crop material of the bale being formed in the baling chamber. A deflector is mounted on the baling chamber to extend through the same slot as the star wheel sensor. The deflector has a region inclined relative to the slot to deflect the twine away from the star wheel.