fixed bugs on loopback interface