correcting bug in get_bridge()