fix router bugs