I first attempted to extract logic from the code that normalizes DNs, but I was unsuccessful. This is a hack but it works.