Fixed a crash when setting up v-tables

Changes are this many because this is supposed to be merged after pull #81.