fixed potential table off-by-one during resize