advanced routing bug fix.