scaling + zero length line fix