Normalize function fixed