Changed the condition of updating capacity for repeating.
Merge pull request #3 from wutali/updating_capacity_bug

Bug of updating capacity of tables.