fix bug in routing table lookups