fixed a crash bug during normalization