Fixed linefits to accept compressed grid case.