Fix confidence generation