Lines counting fixed