Fix a bug when a line is empty.