fix bug if route pass undefined