Add condition for making routeName(fix bugs)