fixed the bugs if cols >26