Fixing a bug in the router