json and mutex fix