Fix bug for routing