Add debugging. Release update mutex properly.