Changed lock object and put a lock around update totals that is different from the primary lock (STREAMS-89)