Various fixes to routing mechanisms