Improved on line detection.