fixing bug generateColumns
fixing bug generateColumn