Reworked the line counting thread issue.