Changing normalization format and fixed a bug

Changed the normalization from the sum of 1 to the min of 1.