Introduce incomplete line detection and processing