fixing Nan Score at normalization

Adding test and fixing bug