Fix gamma overflow.