Connection intersection bug fix

vertical lines are detected now