fix a bug when no controller provided in the router