fix router code