Reverse total to be mutable non-atomic since totalValid can be used as a lock