Fixed a bug where normalization was not occuring with the right values