Fix bug on the route closure.