Fixed all bugs in routing