Fix invalid index in column lookup