fix a bug where the first line is ignored