Fixes bug in routing