sudo nano /etc/hosts
Change the hostname to something else for the IP addresses that are not 127.0.0.1 and 127.0.1.1
sudo nano /etc/hostname
Change the hostname for this to whatever you did before. I don't think you can use dots on this one
sudo hostname newhostname
You can restart networking or reboot for the changes to take effect.