fixed a bug generating column numbers in tables