bugfix in table column checking function