Some fixes to routing