fixed first line skip bug from writer.go