fix bug making total count disappear after grid resize, and bug preventing cell "on/off" after recursion run