Fixed bug in FactorNormalize for assignment 4