linear ports arranging is corrected to work ok for broken lines