Fix very rare crash upon using wrench.