revisit and fix mutexes in consensus package