Fixes server logic for determining which route to map