BUG: fix max_columns=0, close #2856

#2856