Bug fixes after removal of static total field