Fixed the issue with perfectly vertical lines and lines with a low slope.