Fix crasher when table has no primary key. Fixes #6.