Fix bugs in the normalization.