Fix routing error

It should fix #2598.