Better route inference

Fix bugs from yesterday