Line count is off by one error