Don't hard-code table index

Fixes #1