fix a bug in the router with the router mandatory feature