finally fixed the loopback bug