Fix divide-by-zero issue with normalizing adjusted weights.