Fix crash when changing the hero sprites.