Improvements to tie line calculation.