fix set master key deadlock