fix crash when table is empty;
Merge pull request #15 from exister/master

fix crash when table is empty;