clean and handle weird functionning trailing dots at the end of domain names