Handle empty lines correctly.