Don't crash when defeated.
Merge branch 'master' into tmp