fix router for optimizer