Corrected bug in linecount