Fixing bugs in routing