bugfix for #2

still need to figure out formal tests, but this should fix the column
matching problems.