Fixes bug with routes