Prevent bar overflow.