Fix issue where updating the table would hang

The issue was that initializing the static variable would happen only once. Needed to set its value to zero separate of when it was declared.