Fixed a bug in the routing