Fix bug causing to ping wrong host.