Fix corrupted image (and probably crashes) when changing the player's