Dont calculate line count infinite times