Fixing route when error