fix table size computation