Adapted to new mutex syntax, which was just fixed in ccore