Fix table size calculation bug in bestTable algorithm (<TH>) closes #18